// 在 [min, max] 范围内获取 count 个不重复的随机数
function getRandomValues(min, max, count) {
  const randomNumbers = [];

  for (let i = 0; i < count; i++) {
    let random;
    do {
      random = Math.floor(Math.random() * (max - min + 1)) + min;
    } while (randomNumbers.includes(random));
    randomNumbers.push(random);
  }

  return randomNumbers;
}

module.exports = {
  getRandomValues: getRandomValues
}